n=int(input())
a=[int(input()) for x in range(n)]
a.sort()
if(sum(a[:-1])<a[-1]):
    print(sum(a[:-1]))
else:
    print(sum(a)/2)